Tokens for For Each Row
If you have a Custom Query activity that uses a SELECT query and you test the query first, the activity creates one token per column in the database table. These tokens are available to activities inside the For Each Row. The For Each Row activity runs one time per row in the column. Each time it runs, the token value reflects the information relevant to the row it is currently processing.
Name | Description | Sample Syntax* |
---|---|---|
Column Name | A token is created for each column in the database table. The token name is the same as the column name. The token's value is the value in the Column Name column of the current row. | %(ForEachRow_Column Name) |
Iteration | The number of times the For Each Row activity has run. | %(ForEachRow_Iteration) |
*The "ForEachRow" portion of the syntax changes to match the activity's name as specified in the Activity Name property box. Note that all non-alphanumeric characters, except underscores, are removed from the name. For example, if you rename the activity Process [Rows], the syntax for the column named "Addresses" token will be %(ProcessRows_Adddresses).